package org.smile.homework01.paladin.parking;

public class Cars {

    String size;
    int parkingTime;
    String namePlate;

    public Cars(){
        int s = (int)(Math.random()*10);
        if(s%2==0){
            this.size = "大";
        }else{
            this.size = "小";
        }
        int n = (int)(Math.random()*10000);
        this.namePlate = "粤A"+n;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        size = size;
    }

    public int getParkingTime() {
        return parkingTime;
    }

    public void setParkingTime(int parkingTime) {
        this.parkingTime = parkingTime;
    }

    public String getNamePlate() {
        return namePlate;
    }

    public void setNamePlate(String namePlate) {
        this.namePlate = namePlate;
    }

    public Cars(int time,String namePlate) {

        int i = (int)(Math.random()*10);
        if(i%2==0){
            this.size = "大";
        }else{
            this.size = "小";
        }
        this.parkingTime = time;
    }
}
